using System;

namespace SharpMud.Server.Systems.Metadata
{
	[AttributeUsage(System.AttributeTargets.Class)]
	public sealed class VersionAttribute : System.Attribute, IServerSystemMetadatum
	{
		private System.Version	_ServerSystemVersion;

		public VersionAttribute(string serverSystemVersion)
		{
			_ServerSystemVersion = new Version(serverSystemVersion);
		}

		public VersionAttribute(System.Version serverSystemVersion)
		{
			_ServerSystemVersion = serverSystemVersion;
		}

		#region IServerSystemMetadatum Members

		public string Name
		{
			get
			{
				return "Version";
			}
		}

		public System.Version Value
		{
			get
			{
				return _ServerSystemVersion;
			}
		}
		string IServerSystemMetadatum.Value
		{
			get
			{
				return _ServerSystemVersion.ToString();
			}
		}

		#endregion
	}
}
